package _15_generics._15_2.exercise;

import _15_generics._15_2.Holder3;
import typeinfo.pets.Mouse;
import typeinfo.pets.Pet;

/**
 * 如果Holder3持有的一个基类，那么也可以持有对应的子类
 */
public class E01_PetsHolder {
    public static void main(String[] args) {
        Holder3<Pet> h3 =
                new Holder3<Pet>(new Mouse("Mickey"));
        System.out.println(h3.get());
    }
}
